package com.mxpio.erp.common.mes.entity;

import com.mxpioframework.jpa.annotation.DictAble;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

@Data
@Entity
@Table(name = "V_MB_ERP_MES_AOI_LINE_DEFECT_SUM")
@Schema(description="aoi明细按天 汇总DEFECT数量")
@NoArgsConstructor
@AllArgsConstructor
public class VAoiLineDayDefectSum implements DictAble, Serializable {

	private static final long serialVersionUID = 1L;
	@Id
	@Column(name = "id")
	@Schema(description = "id")
	private String id;

	@Column(name = "EXECUTE_DAY_")
	@Schema(description = "生产日期")
	private String executeDay;

	@Column(name = "DEFECT_")
	@Schema(description = "异常")
	private String defect;

	@Column(name = "DEFECT_SUM_")
	@Schema(description = "数量")
	private String defectSum;

	@Transient
	private Map<String, String> textMap;

	public String putText(String key, String value) {
		if (textMap == null) {
			textMap = new HashMap<>();
		}
		return textMap.put(key, value);
	}

}
